/** 
 * File-Name:APIInfo.java
 *
 * Created on 2011-4-21 上午10:03:09
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package com.exceptionhandler.entity;

import java.util.UUID;

/**
 * Description:
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2011-4-21 上午10:03:09
 */
public class APIInfo extends CommonEntity {
	private String uuid = UUID.randomUUID().toString();
	private String methodName;
	private String inputParameters;
	private String output;
	private String comment;
	private String throwExceptions;
	private String signature;
	private String javaDocUrl;

	public String getClassName() {
		if (methodName == null) {
			return null;
		} else {
			return new String(methodName.substring(0, methodName
					.lastIndexOf(".")));
		}
	}

	/**
	 * 
	 * Description: Extract the short class name from the full name stored in
	 * className field.
	 * 
	 * @return String
	 */
	public String getShortClassName() {
		if (getClassName() == null) {
			return null;
		} else {
			return new String(getClassName().substring(
					getClassName().lastIndexOf(".") + 1));
		}
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public String getJavaDocUrl() {
		return javaDocUrl;
	}

	public void setJavaDocUrl(String javaDocUrl) {
		this.javaDocUrl = javaDocUrl;
	}

	public String getInputParameters() {
		return inputParameters;
	}

	public void setInputParameters(String inputParameters) {
		this.inputParameters = inputParameters;
	}

	public String getOutput() {
		return output;
	}

	public void setOutput(String output) {
		this.output = output;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getThrowExceptions() {
		return throwExceptions;
	}

	public void setThrowExceptions(String throwExceptions) {
		this.throwExceptions = throwExceptions;
	}

	public String getSignature() {
		return signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
}
